package com.wsq.springcloud;

import com.wsq.myrule.MyRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;

//消费者 运行方式80可省略  例：localhost/consumer/dept/list
//Ribbon 和 Eureka 整合后，客户端可直接调用，不用关心Ip地址和端口号，会在定义的多个地址中随机选择
@SpringBootApplication
@EnableEurekaClient//在服务启动后，自动注册到Eureka注册中心中
@RibbonClient(name = "SPRINGCLOUD-PROVIDER-DEPT", configuration = MyRule.class) // 在微服务启动的时候就能去加载自定义Ribbon类
public class DeptConsumer_80 {
    public static void main(String[] args) {
        SpringApplication.run(DeptConsumer_80.class, args);
    }
}